package com.blog.myblog.dao;/*
    author dadaguai
    date:2022/3/14 15:06
*/

import com.blog.myblog.po.Type;
import org.hibernate.metamodel.model.convert.spi.JpaAttributeConverter;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface TypeRepository extends JpaRepository<Type,Long> {

    Type findByName(String name);
    @Query("select t from Type t")
    List<Type> findTop(Pageable pageable);
}

